class Subcategory < ApplicationRecord
  belongs_to :category
  has_many :microposts

  
  validates :name,  presence: true
  validates :category_id,  presence: true


end
